package vista;
import java.awt.BorderLayout;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;

import javax.swing.WindowConstants;
import javax.swing.SwingUtilities;

import Controlador.ControladorVentanaprincipal;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class VentanaPrincipal extends javax.swing.JFrame {
	private JPanel Pancontenedor;
	private JButton btncompetencia;
	private JPanel panconsulta;
	private JPanel panelregistro;
	private JLabel lbltitulo;
	private JButton btnmedallas;
	private JButton btneliminatoria;
	private JButton btnequipo;
	private JButton btnjuez;

	/**
	* Auto-generated main method to display this JFrame
	*/

	
	public VentanaPrincipal(ControladorVentanaprincipal controladorventanaprincipal) {
		super();
		initGUI();
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			{
				Pancontenedor = new JPanel();
				getContentPane().add(Pancontenedor, BorderLayout.CENTER);
				Pancontenedor.setLayout(null);
				Pancontenedor.setPreferredSize(new java.awt.Dimension(385, 241));
				Pancontenedor.setForeground(new java.awt.Color(255,255,255));
				Pancontenedor.setBackground(new java.awt.Color(255,255,255));
				{
					btncompetencia = new JButton();
					Pancontenedor.add(btncompetencia);
					btncompetencia.setText("Generar Competencia");
					btncompetencia.setBounds(85, 174, 194, 22);
				}
				{
					lbltitulo = new JLabel();
					Pancontenedor.add(lbltitulo);
					lbltitulo.setText("Menu Principal");
					lbltitulo.setBounds(111, 12, 251, 31);
					lbltitulo.setFont(new java.awt.Font("Bitstream Charter",1,18));
				}
				{
					panelregistro = new JPanel();
					Pancontenedor.add(panelregistro);
					panelregistro.setLayout(null);
					panelregistro.setBounds(7, 71, 170, 80);
					panelregistro.setBackground(new java.awt.Color(255,255,255));
					{
						btnjuez = new JButton();
						panelregistro.add(btnjuez);
						btnjuez.setText("Registrar Juez");
						btnjuez.setBounds(12, 12, 142, 24);
						btnjuez.setToolTipText("Registro o consulta de juez");
					}
					{
						btnequipo = new JButton();
						panelregistro.add(btnequipo);
						btnequipo.setText("Registrar Equipo");
						btnequipo.setBounds(12, 47, 158, 25);
					}
				}
				{
					panconsulta = new JPanel();
					Pancontenedor.add(panconsulta);
					panconsulta.setLayout(null);
					panconsulta.setBounds(183, 71, 195, 80);
					panconsulta.setBackground(new java.awt.Color(255,255,255));
					{
						btnmedallas = new JButton();
						panconsulta.add(btnmedallas);
						btnmedallas.setText("Consultar Medallas");
						btnmedallas.setBounds(12, 12, 172, 22);
					}
					{
						btneliminatoria = new JButton();
						panconsulta.add(btneliminatoria);
						btneliminatoria.setText("Ver eliminatoria");
						btneliminatoria.setBounds(12, 45, 172, 22);
					}
				}
			}
			pack();
			this.setSize(379, 255);
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
	}
	public void agregarlistener (ActionListener action)
	{
		btncompetencia.addActionListener(action);
		btneliminatoria.addActionListener(action);
		btnequipo.addActionListener(action);
		btnjuez.addActionListener(action);
		btnmedallas.addActionListener(action);
	}
	

}
